﻿using DAL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BLL
{
    public class DepartmentService
    {
        private DepartmentDao departmentDao = new DepartmentDao();
        public List<Department> list(Department department)
        {
            return departmentDao.list(department);
        }

        public bool save(Department department)
        {
            int res = departmentDao.save(department);
            return res > 0;
        }
        public int getMaxId()
        {
            return departmentDao.getMaxId();
        }

        public bool deleteById(int departmentID)
        {
            return departmentDao.deleteById(departmentID) > 0;
        }
    }
}
